package com.topone.dataObject;

import com.topone.Enum.DynamicInfoEnum;
import lombok.Data;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.Id;
import java.util.Date;

/**
 * Created by Administrator on 2018/1/21,0021.
 */
@Entity
@Data
@DynamicUpdate
@EntityListeners(AuditingEntityListener.class)
public class DynamicInfo {

    @Id
    private String dynamicId;
    private String dynamicUrl;
    private String dynamicIcon;
    private String dynamicMsg;
    private String bussinessId;
    private String openid;
    private Integer status= DynamicInfoEnum.success.getCode();
    @CreatedDate
    private Date   createTime;
    @LastModifiedDate
    private Date   updateTime;
}
